<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<script>
    var  a = prompt("请输入要查询的月份！");
    if (a >= 1 && a <= 12){
        if (a >= 5 && a <= 10 ){
            var sb = prompt("查询头等舱还是经济舱？");
            if (sb == "头等舱"){
                console.log("2000");
            }else {
                console.log("800");
            }
        }else {
            var sb2 = prompt("查询头等舱还是经济舱？");
            if (sb2 == "头等舱"){
                console.log("800");
            }else {
                console.log("200");
            }
        }
    }else {
        alert("请输入正确的月份");
    }

</script>
</body>
</html>